package cn.novel.bm.domain.novel;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Type;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import java.util.Date;
import java.util.UUID;

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "段落")
public class Paragraph {

    @Id
    @Type(type = "org.hibernate.type.PostgresUUIDType")
    private UUID paragraphId;
    @Column(length = 5000)
    private String content;
    private Integer wordCount;
    private Integer prev;
    private Integer next;

    private Date createAt;
    private Date updateAt;

    @ManyToOne
    private Chapter chapter;

    @ManyToOne
    private NovelRole novelRole;

    @ManyToOne
    private Episode episode;


}
